<%--
  Created by IntelliJ IDEA.
  User: 29265
  Date: 2024/12/25
  Time: 17:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <style>
        /* 页面整体背景颜色及字体设置 */
        body, html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            background-color: #f4f4f4;
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        /* 表单容器样式 */
        .form-container {
            width: 300px;
            background-color: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
            text-align: center;
        }
        /* 标题样式 */
        .form-title {
            margin-bottom: 20px;
            font-size: 20px;
            font-weight: bold;
            color: #333;
        }
        /* 输入框和选择器样式 */
        .input-group {
            margin-bottom: 15px;
            text-align: left;
        }
        .input-group label {
            display: block;
            margin-bottom: 5px;
            font-size: 14px;
            color: #555;
        }
        input[type="text"],
        input[type="password"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-sizing: border-box;
        }
        /* 单选按钮样式 */
        .radio-group {
            margin-bottom: 15px;
            text-align: left;
        }
        .radio-group label {
            margin-right: 20px;
        }
        input[type="radio"] {
            margin-right: 5px;
        }
        /* 提交按钮样式 */
        .submit-buttons {
            margin-top: 20px;
        }
        input[type="submit"] {
            background-color: #007bff;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        input[type="submit"]:hover {
            background-color: #0056b3;
        }
        input[type="submit"].reset {
            background-color: #6c757d;
            margin-left: 10px;
        }
        input[type="submit"].reset:hover {
            background-color: #5a6268;
        }
        /* 跳转按钮样式 */
        .redirect-button {
            display: inline-block;
            margin-top: 20px;
            background-color: #28a745;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            text-decoration: none;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .redirect-button:hover {
            background-color: #218838;
        }
    </style>
</head>
<body>
<div class="form-container">
    <p class="form-title">用户登录</p>
    <form action="userServlet" method="post">
        <div class="input-group">
            <label for="userName">用户名：</label>
            <input type="text" id="userName" name="userName" required>
        </div>
        <div class="input-group">
            <label for="passWord">密码：</label>
            <input type="password" id="passWord" name="passWord" required>
        </div>
        <div class="radio-group">
            <label><input type="radio" value="1" name="userType" required>学生</label>
            <label><input type="radio" value="2" name="userType" required>管理员</label>
        </div>
        <div class="submit-buttons">
            <input type="submit" value="登录">
            <input type="reset" value="重置" class="reset">
        </div>
    </form>
    <!-- 添加跳转到注册页面的按钮 -->
    <a href="userRegister.jsp" class="redirect-button">前往注册</a>
</div>
</body>
</html>
